<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<div id="menuImpiegato">
		<ui:include src="/pagine_impiegati/commonHeader.xhtml" />
	</div>
</h:head>

<h:body>
	<h:form>
		<p:panel header="Form Creazione Escursione">
			<h:panelGrid columns="3" id="escurGrid">

				<h:outputLabel for="nome">Nome: </h:outputLabel>
				<p:inputText id="nome" value="#{escurBean.escursione.nome}" />
				<p:message for="nome" />
				
				<h:outputLabel for="citta">Citta: </h:outputLabel>
				<p:inputText id="citta" value="#{escurBean.escursione.citta}"/>
				<p:message for = "citta"/>
				
				<h:outputLabel for="postiRimanenti">Posti Rimanenti:</h:outputLabel>
				<p:spinner id="postiRimanenti" value="#{escurBean.escursione.postiRimanenti}" min="1" />
				<p:message for="postiRimanenti" />
				
				<h:outputLabel for="prezzo">Prezzo: </h:outputLabel>
				<p:spinner id="prezzo" value="#{escurBean.escursione.prezzoSingolo}" min="1" />
				<p:message for="prezzo" />
				
				<h:outputLabel for="data">Data:</h:outputLabel>
				<p:calendar id = "data" value = "#{escurBean.escursione.inizio}"/>
				<p:message for ="data"/>
				

			</h:panelGrid>
			<p:commandButton value="Conferma" update="escurGrid"
				action="#{escurBean.creaEscursione()}" />
		</p:panel>
	</h:form>
</h:body>
</html>